<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>广告标识</title>
</head>

<body>
    重点在于a标签和广告文本的定位
    <div class="Pc-card Card">
        <a class="Banner-link" href="https://zhuanlan.zhihu.com/p/630364987" target="_blank">
            <div class="Banner-adTag">广告</div>
            <div class="AdvertImg">
                <img alt="广告"
                    src="https://pic3.zhimg.com/v2-c84aabc7fa62897892865af0011e3841_720w.webp?source=d6434cab">
            </div>
        </a>
        <div class="Pc-card-button-close " data-tooltip="不再显示" data-tooltip-position="bottom">
            <svg viewBox="0 0 12 12" class="Icon Icon--close Pc-card-button-close-svg ">
                <path fill-rule="evenodd" d="M3 2L2 3l3 3-3 3 1 1 3-3 3 3 1-1-3-3 3-3-1-1-3 3"></path>
            </svg>
        </div>
    </div>
    <style>
        body {
            max-width: 300px;
            margin: 0 auto;
            padding: 20px 0;
        }

        a {
            color: inherit;
            text-decoration: none;
        }


        .Card {
            background: #fff;
            border-radius: 2px;
            -webkit-box-shadow: 0 1px 3px hsla(0, 0%, 7%, .1);
            box-shadow: 0 1px 3px hsla(0, 0%, 7%, .1);
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            margin-bottom: 10px;
            overflow: hidden;
        }

        .Pc-card {
            border-radius: 2px;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            overflow: hidden;
            position: relative;
            -webkit-transition: height .3s, margin .3s, opacity .3s;
            transition: height .3s, margin .3s, opacity .3s;
            width: 100%;
        }



        .Pc-card .Banner-link {
            display: block;
            position: relative;
        }

        .Pc-card .Banner-adTag {
            background-color: #000;
            border: 1px solid #ebebeb;
            border-radius: 5px;
            bottom: 5px;
            color: #ebebeb;
            font-size: 12px;
            line-height: 27px;
            opacity: .5;
            position: absolute;
            right: 5px;
            text-align: center;
            width: 45px;
            z-index: 1;
        }

        .AdvertImg {
            background-color: transparent;
            position: relative;
        }

        .AdvertImg img {
            border-radius: inherit;
            height: 100%;
            -o-object-fit: cover;
            object-fit: cover;

            text-indent: -9999px;
            -webkit-transition: opacity .5s linear;
            transition: opacity .5s linear;
            vertical-align: top;
            width: 100%;
        }

        .Pc-card-button-close {
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            background-color: #1a1a1a;
            border-color: transparent;
            border-radius: 50%;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            height: 18px;
            justify-content: center;
            opacity: 0;
            padding: 0;
            position: absolute;
            right: 12px;
            top: 12px;
            -webkit-transition: opacity .3s;
            transition: opacity .3s;
            width: 18px;
        }

        .Pc-card-button-close-svg {
            fill: #fff;
            height: 16px;
            width: 14px;
        }

        .Pc-card:hover .Pc-card-button-close {
            opacity: 1;
        }
    </style>

</body>

</html>